extends "../pulimaosi-2/pulimaosi-2.gd"


func _extInit():
	._extInit()
	if isInManual():
		addSkill(sk2t1[1], sk2t1[0])
		addSkill(sk2t2[1], sk2t2[0])
	elif sk2 != 0:
		doChoiceSkill2()
	lv = 3             #等级的设置

var sk2t1 = ["雾雨·1", "敌方角色发动技能时，20%概率发动失败并立即受到来自普利茅斯的炮击"]
var sk2t2 = ["雾雨·2", "敌方角色发动技能时，普利茅斯提高10%暴击伤害"]

func doChoiceSkill2():
	var sk = get("sk2t%d"%sk2)
	addSkill(sk[1], sk[0])

func preCharaCastCdSkill(cha, sk):
	.preCharaCastCdSkill(cha, sk)
	if sk2 == 1 and sys.rndPer(20):
		sk.enable = false
		.normalAtkChara(cha)
		utils.createSkillTextEff("雾雨", position)

func _onCharaCastCdSkill(cha,id):
	._onCharaCastCdSkill(cha,id)
	if sk2 == 2:
		var bf = hasBuff("b_pilimaosi2")
		if bf == null:
			addBuff(b_pilimaosi2.new())
		bf.att.atkR += 0.1

class b_pilimaosi2:
	extends "../../../../azurlane_ctrl/AzurBuff.gd"
	func _init():
		attInit()
		id = "b_pilimaosi2"	
		dispel = 2